<?php echo Modules::run('admin/header') ?>
 
<!-- start content-outer -->
<div id="content-outer">
<!-- start content -->
<div id="content">


<div id="page-heading"><h1><?php echo $title; ?></h1></div>


<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
<tr>
	<th rowspan="3" class="sized"><img src="<?php echo base_url('images/shared/side_shadowleft.jpg') ?>" width="20" height="300" alt="" /></th>
	<th class="topleft"></th>
	<td id="tbl-border-top">&nbsp;</td>
	<th class="topright"></th>
	<th rowspan="3" class="sized"><img src="<?php echo base_url('images/shared/side_shadowright.jpg') ?>" width="20" height="300" alt="" /></th>
</tr>
<tr>
	<td id="tbl-border-left"></td>
	<td>
	<!--  start content-table-inner -->
	<div id="content-table-inner">	           

	<?php
		if( isset($errors) && !empty($errors) )
		{
			echo $errors;
		}
	?>    
                                
    <?php echo form_open_multipart('admin/editCompanyFinanceInfo/'. $company_id) ?>
	<table border="0" width="100%" cellpadding="0" cellspacing="0">
	<tr valign="top">
	<td>					
		<?php echo $company_options_bar; ?>

		<!-- start id-form -->
		<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
		<tr>
			<th valign="top">Doanh thu:</th>
			<td><input type="text" name="top_balance" class="inp-form" value=""/></td>			
		</tr>
        <tr>
            <th valign="top">Tăng trưởng:</th>
            <td><input type="text" name="balance_increase" class="inp-form" value=""/></td>            
        </tr>
		<tr>
            <th valign="top">Lợi nhuận từ HĐKD:</th>
            <td><input type="text" name="top_contract_profit" class="inp-form" value=""/></td>        
        </tr>
        <tr>
            <th valign="top">LNST</th>
            <td><input type="text" name="top_net_profit" class="inp-form" value=""/></td>        
        </tr>
        <tr>
            <th valign="top">Tỷ suất lợi nhuận ròng:</th>
            <td><input type="text" name="net_profit_percent" class="inp-form" value=""/></td>        
        </tr>
        <tr>
            <th valign="top">ROE (%):</th>
            <td><input type="text" name="roe" class="inp-form" value=""/></td>        
        </tr>
        <tr>
            <th valign="top">Tiền mặt tại quỹ:</th>
            <td><input type="text" name="current_money" class="inp-form" value=""/></td>        
        </tr>
        <tr>
            <th valign="top">TTS:</th>
            <td><input type="text" name="top_asset" class="inp-form" value=""/></td>            
        </tr>
        <tr>
            <th valign="top">VCSH:</th>
            <td><input type="text" name="vcsh" class="inp-form" value=""/></td>            
        </tr>
        <tr>
            <th valign="top">Nợ:</th>
            <td><input type="text" name="total_debt" class="inp-form" value=""/></td>            
        </tr>
        <tr>
            <th valign="top">NNH:</th>
            <td><input type="text" name="short_debt" class="inp-form" value=""/></td>            
        </tr>
        <tr>
            <th valign="top">Hệ số nợ/ tổng tài sản:</th>
            <td><input type="text" name="hsn" class="inp-form" value=""/></td>            
        </tr>
        <tr>
            <th valign="top">Vay ngân hàng:</th>
            <td><input type="text" name="vnh" class="inp-form" value=""/></td>            
        </tr>
        <tr>
            <th valign="top">Hệ số vay/ NVCSH:</th>
            <td><input type="text" name="hsv" class="inp-form" value=""/></td>            
        </tr>
		<tr>
			<th valign="top">Biểu đồ:</th>
			<td><input type="file" class="file_1" name="upload"/></td>			
		</tr>
		<tr>
			<th valign="top">Năm:</th>
			<td>
				<input type="text" name="year" class="inp-form" value=""/>
			</td>			
		</tr>	
	<tr>
		<th>&nbsp;</th>
		<td valign="top">
			<input type="submit" name="submitBtn" value="submit" class="form-submit" />
			<input type="reset" value="" class="form-reset"  />
		</td>
		<td></td>
	</tr>
	</table>
        </form>
	<!-- end id-form  -->

	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="<?php echo base_url('images/shared/side_shadowleft.jpg') ?>" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="<?php echo base_url('images/shared/side_shadowright.jpg') ?>" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id="content-table-inner">
		
			<!--  start table-content  -->
			<div id="table-content">
			
				<!-- Error message -->

				<!-- Error message -->
		
		 
				<!--  start product-table ..................................................................................... -->
				<form id="mainform" action="">
				<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
				<tr>
					<th class="table-header-check"><a id="toggle-all" ></a> </th>
					<th class="table-header-repeat line-left"><a href="">Doanh thu</a></th>
                    <th class="table-header-repeat line-left"><a href="">Lợi nhuận HĐKD</a></th>
					<th class="table-header-repeat line-left"><a href="">LNST</a></th>
					<th class="table-header-repeat line-left"><a href="#">Tỷ suất lợi nhuận ròng</a></th>
					<th class="table-header-repeat line-left"><a href="">ROE (%)</a></th>					
                    <th class="table-header-repeat line-left"><a href="">Tiền mặt tại quỹ</a></th>
                    <th class="table-header-repeat line-left"><a href="">TTS</a></th>
                    <th class="table-header-repeat line-left"><a href="">VCSH</a></th>
                    <th class="table-header-repeat line-left"><a href="">Nợ</a></th>
                    <th class="table-header-repeat line-left"><a href="">NNH</a></th>
                    <th class="table-header-repeat line-left"><a href="">Hệ số nợ</a></th>
                    <th class="table-header-repeat line-left"><a href="">Vay ngân hàng</a></th>
                    <th class="table-header-repeat line-left"><a href="">Hệ số vay</a></th>
                    <th class="table-header-repeat line-left"><a href="">Năm</a></th>
					<th class="table-header-repeat line-left"><a href="">Options</a></th>
				</tr>
				<?php
					if( isset($finances) && !empty($finances) )
					{											
                        foreach($finances as $finance)						
                        {
				?>				
				<tr class="alternate-row">
					<td><input  type="checkbox"/></td>
					<td><?php echo $finance['top_balance'] ?></td>
					<td><?php echo $finance['top_contract_profit'] ?></td>
                    <td><?php echo $finance['top_net_profit'] ?></td>
                    <td><?php echo $finance['net_profit_percent'] ?></td>
                    <td><?php echo $finance['roe'] ?></td>
                    <td><?php echo $finance['current_money'] ?></td>
                    <td><?php echo $finance['top_asset'] ?></td>
                    <td><?php echo $finance['vcsh'] ?></td>
                    <td><?php echo $finance['total_debt'] ?></td>
                    <td><?php echo $finance['short_debt'] ?></td>
                    <td><?php echo $finance['hsn'] ?></td>
                    <td><?php echo $finance['vnh'] ?></td>
					<td><?php echo $finance['hsv'] ?></td>
					<td><?php echo $finance['year'] ?></td>					
					<td>
					<a href="<?php echo site_url('admin/editCompanyFinanceInfo/'.$company_id.'/'.$finance['id']) ?>" title="Edit" class="icon-1 info-tooltip"></a>
					<a href="<?php echo site_url('admin/deleteCompanyFinanceInfo/'.$company_id.'/'.$finance['id']) ?>" onClick="javascript:return confirm('Are you sure to delete it ?')" title="Delete" class="icon-2 info-tooltip"></a>					
					</td>
				</tr>	
				<?php	
                        }					
					}
					else
					{
						echo '<tr><td colspan="7">Chưa có dữ liệu</td></tr>';
					}
				?>			
				</table>
				<!--  end product-table................................... --> 
				</form>
			</div>
			<!--  end content-table  -->
		
			<!--  start actions-box ............................................... -->
			<!--
			<div id="actions-box">
				<a href="" class="action-slider"></a>
				<div id="actions-box-slider">
					<a href="" class="action-edit">Edit</a>
					<a href="" class="action-delete">Delete</a>
				</div>
				<div class="clear"></div>
			</div>
			-->
			<!-- end actions-box........... -->
			
			<!--  start paging..................................................... -->
			<table border="0" cellpadding="0" cellspacing="0" id="paging-table">
			<tr>
			<td>
				<a href="" class="page-far-left"></a>
				<a href="" class="page-left"></a>
				<div id="page-info">Page <strong>1</strong> / 15</div>
				<a href="" class="page-right"></a>
				<a href="" class="page-far-right"></a>
			</td>
			<td>
			<select  class="styledselect_pages">
				<option value="">Number of rows</option>
				<option value="">1</option>
				<option value="">2</option>
				<option value="">3</option>
			</select>
			</td>
			</tr>
			</table>
			<!--  end paging................ -->
			
			<div class="clear"></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>

	</td>
	<td>	
	</td>
</tr>
<tr>	

</tr>
<tr>
    <td><img src="<?php echo base_url('images/shared/blank.gif') ?>" width="695" height="1" alt="blank" /></td>
<td></td>
</tr>
</table>
 
<div class="clear"></div>
 

</div>
<!--  end content-table-inner  -->
</td>
<td id="tbl-border-right"></td>
</tr>
<tr>
	<th class="sized bottomleft"></th>
	<td id="tbl-border-bottom">&nbsp;</td>
	<th class="sized bottomright"></th>
</tr>
</table>

<div class="clear">&nbsp;</div>

</div>
<!--  end content -->
<div class="clear">&nbsp;</div>
</div>
<!--  end content-outer -->

 
<?php echo Modules::run('admin/footer') ?>